#丢失的数字

def missingNumber(nums):
    """
    :type nums: List[int]
    :rtype: int
    """
    nums.sort()
    for i in range(len(nums)):
        if i != nums[i]:
            return i
    return len(nums)

print(missingNumber([0,1,3]))
print(missingNumber([1,4,7,3,5,6,0]))